Service Account API
GET api/v2/dataCollector/serviceAccount/
Description
Get the list of the service accounts. Use *
for all organizations and/or sites.
Header Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
Authorization | Bearer API token/key. The format is Bearer <API_key> | String | Yes | |
orgId | The ID of the organization. The format is OrgId:OrgName | String | Yes | |
siteId | The ID of the site. The format is SiteId:SiteName | String | Yes |
CURL Example
The below code snippet shows an example of the API call, where <NCE-IP>
, <ORG-ID>
, <SITE-ID>
& <API-TOKEN>
are variables.
curl --location 'https://<NCE-IP>/api/v2/dataCollector/serviceAccount/' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Authorization: Bearer <API-TOKEN>'
Response
Upon a successful request, the API returns Status code 200 with the following body:
Name | Description | Type |
---|---|---|
TELNET | List of all service accounts with connection type Telnet | Array of objects |
- ref | String | |
- docStatus | String | |
- lastUpdateTime | Last time when the record was updated. The format is timeyyyy-MM-ddThh:mm:ss.tttZ | Sting |
- lastCMDBUpdateTime | Not in use. Last time the record was pushed to the CMDB. The format is timeyyyy-MM-ddThh:mm:ss.tttZ | String |
- cmdbSysId | Not in use. CMDB ID associated with the record | String |
- updateLog | String | |
- orgId | Organization ID | String |
- siteId | Site ID | String |
- groupId | Group ID | String |
- connector | Connector type name | String |
- serviceAccount | Service account name | String |
- credential | List of detailed credentials for the service account | Array of objects |
-- username | Username used for authentication in the service account | String |
-- password | Password. It's null in the response | String |
-- enablePassword | Password enable. It's null in the response | String |
-- app | Service account application name | String |
-- owner | Service account owner, if applicable | String |
-- sharing | String | |
-- sshkey | Service account SSH key | String |
-- version | Service account protocol version | String |
-- securityName | Service account security name | String |
-- url | API connection URL used by the service account | String |
-- key | API key used by the service account | String |
-- snmpCommunityString | Service account SNMP community string | String |
-- authProtocol | Service account authentication protocol | String |
-- authKey | Service account authentication key for the protocol | String |
-- privProtocol | Service account privilege protocol | String |
-- privKey | Service account authentication key for the privilege protocol | String |
-- context | Service account credentials context | String |
-- openStackCred | Not in use. Credentials for OpenStack discovery | Object |
-- socketLayer | Socket layer | String |
-- port | Socket layer port | String |
-- addInfo | Database credentials details | Object |
--- ip | Database server IP | String |
--- database_name | Database name | String |
--- fqdn | Database server FQDN | String |
-- apiKey | Service account API key | String |
-- regions | Service account Cloud regions | Array of strings |
-- accountName | Service account name | String |
-- tenantId | Service account Cloud tenant ID | String |
-- subscriptionId | Service account Cloud subscription | String |
-- locations | Array of strings | |
-- ports | Ports on which the service is running | Array of integers |
- url | String | |
- accountType | String | |
- action | The API action used when creating or editing a service account. It's null in the response | String |
SNMP | List of all service accounts with connection type SNMP. The service account objects are with the same structure as for TELNET | Array of objects |
WINDOWS | List of all service accounts with connection type WINDOWS. The service account objects are with the same structure as for TELNET | Array of objects |
SSH | List of all service accounts with connection type SSH. The service account objects are with the same structure as for TELNET | Array of objects |
API | List of all service accounts with connection type API. The service account objects are with the same structure as for TELNET | Array of objects |
AWS_CLOUDWATCH | List of all service accounts with connection type AWS_CLOUDWATCH. The service account objects are with the same structure as for TELNET | Array of objects |
CISCO MERAKI | List of all service accounts with connection type CISCO MERAKI. The service account objects are with the same structure as for TELNET | Array of objects |
SILVERPEAK | List of all service accounts with connection type SILVERPEAK. The service account objects are with the same structure as for TELNET | Array of objects |
VIPTELA | List of all service accounts with connection type VIPTELA. The service account objects are with the same structure as for TELNET | Array of objects |
AZURE_API | List of all service accounts with connection type AZURE_API. The service account objects are with the same structure as for TELNET | Array of objects |
POST /api/v2/dataCollector/serviceAccount/
Description
Create a new or edit an existing service account.
Header Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
Authorization | Bearer API token/key. The format is Bearer <API_key> | String | Yes |
Body Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
jsonBody | Service account details. The format is JSON similar to the results from the Get method. | String | Yes |
CURL Example
The below code snippet shows an example of the API call, where <NCE-IP>
, <ORG-ID>
, <SITE-ID>
& <API-TOKEN>
are variables.
curl --location 'https://<NCE-IP>/api/v2/dataCollector/serviceAccount/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API-TOKEN>' \
--data '[
{
"action": "PUT",
"orgId": "<ORG-ID>",
"siteId": "<SITE-ID>",
"url": null,
"accountType": "WINDOWS",
"connector": "WINDOWS",
"serviceAccount": "QA-WINDOWS-a-FS3-YH",
"credential": [{
"username": "administrator",
"password": "testYanaAPI",
"enablePassword": true,
"ports": [
5986,
5985
]
}
]
}
]
'
Response
Upon a successful request, the API returns Status code 200 with the following body:
Name | Description | Type |
---|---|---|
data | A message to update service account configuration has been sent successfully | String |